import { createWebHashHistory, createRouter } from 'vue-router'
import Layout from '@/views/layout/index.vue'
import Dashboard from '@/views/dashboard/index.vue'
import Admin from '@/views/auth/admin/index.vue'
import Group from '@/views/auth/group/index.vue'
import Order from '@/views/vppz/order/index.vue'
import Staff from '@/views/vppz/staff/index.vue'


const routes =[
    {
            path:'/',
            component: Layout,
            name: 'main',
            children:[ 
                {
                    path: 'dashboard',
                    meta:{ id:'1',name:'控制台',icon:'Platform',path:'/dashboard',describe:'用于展示当前系统中的统计数据、统计报表'},
                    component: Dashboard
                },
                {
                  path: 'auth',
                  meta: { id:'2',name:'权限管理',icon:'Grid'},
                  children:[
                    {
                        path:'',
                        alias: ['admin'],
                        meta:{ id:'1',name:'账号管理',icon:'Avatar',path:'/auth/admin',describe:'管理员可以进行编辑，权限修改后需重新登录'},
                        component: Admin
                    },
                    {
                     path:'group',
                     meta:{ 
                           id:'2',
                           name:'菜单管理',
                           icon:'Menu',path:'/auth/group',describe:'菜单规则通常对应一个控制器的方法'},
                        component: Group
                    },
                   ]
                },
                {
                    path:'vppz',
                    meta:{
                        id:'3',
                        name:'DIDI陪诊',
                        icon:'BellFilled',
                        
                    },
                    children:[
                            { 
                                path:'order',
                                meta:{
                                    id:'1',
                                    name:'陪护管理',
                                    icon:'Bell',
                                    path:'/vppz/order',
                                    describe:'陪诊列表用于展示所有陪诊记录'
                                },
                                component:Order
                            },
                           { 
                                path:'staff',
                                meta:{
                                    id:'2',
                                    name:'订单管理',
                                    icon:'Bell',
                                    path:'/vppz/staff',
                                    describe:'工作人员列表用于展示所有工作人员信息'
                                },
                                component:Staff
                            },
                        ]
                }
            ]
    }
]




/////////



const router = createRouter({
  history: createWebHashHistory(),
  routes,
})

export default router;


